Imaging apparatus, imaged picture recording method, and storage medium storing computer program

ABSTRACT

Upon an operation to full-press a shutter button being detected, a CPU detects human faces included in a picture imaged by an imaging unit, counts the number of the faces, and stores the number of the counted faces in a predetermined area of a memory unit. Thereafter, the CPU again detects faces included in an imaged picture and counts the number of the faces. When the number of the counted faces is equal to or smaller than the number of the faces stored in the predetermined area of the memory unit, the CPU repeats the process of detecting faces included in an imaged picture and counting the number of the faces. Meanwhile, when the number of the counted faces has increased from the number of the faces stored, the CPU records a picture that is to be imaged after a predetermined period of time passes in a recording medium.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an imaging apparatus that images apicture, an imaged picture recording method, and a storage medium thatstores a computer program.

2. Description of the Related Art

Unexamined Japanese Patent Application KOKAI Publication No. 2007-329602proposes a camera that detects human faces from an imaged picture,counts the number of the faces, and records the picture in a recordingmedium such as a memory card in a case where the number of the faces isequal to a preset number of persons intended to be imaged.

Unexamined Japanese Patent Application KOKAI Publication No. 2007-329602also proposes a camera that registers a plurality of faces in a faceregistration memory, counts the number of faces that are recognized asany of the registered faces from the faces included in an imagedpicture, and records the picture in a recording medium such as a memorycard in a case where the number of the recognized faces is equal to apreset number of persons intended to be imaged.

SUMMARY OP THE INVENTION

An object of the present invention is to provide an imaging apparatusthat needs no setting of a number of persons intended to be imaged andrecords an imaged picture in response to a change in the number ofimaged persons included in an imaging range, an imaged picture recordingmethod, and a storage medium that stores a computer program.

To achieve the above object, an imaging apparatus according to thepresent invention includes: an imaging unit; a recording instructiondetecting unit that detects an instruction to record a picture that isimaged by the imaging unit; a characteristic picture region detectingunit that detects a characteristic picture region included in a pictureimaged by the imaging unit, the characteristic picture region containinga predetermined characteristic; an obtaining unit that makes the imagingunit image pictures continuously, and obtains a region number each timea picture is imaged, the region number indicating a number ofcharacteristic picture regions that are detected by the characteristicpicture region detecting unit; a determining unit that determineswhether the region number obtained by the obtaining unit has changed ornot; and a recording unit that records an imaged picture in a recordingmedium, in response to that the recording instruction detecting unitdetects a recording instruction and when the determining unit determinesthat the region number has changed.

To achieve the above object, an imaged picture recording methodaccording to the present invention includes: a recording instructiondetecting step of detecting an instruction to record a picture that isimaged by an imaging unit; a characteristic picture region detectingstep of detecting a characteristic picture region included in a pictureimaged by the imaging unit, the characteristic picture region containinga predetermined characteristic; an obtaining step of making the imagingunit image pictures continuously, and obtaining a region number eachtime a picture is imaged, the region number indicating a number ofcharacteristic picture regions detected at the characteristic pictureregion detecting step; a determining step of determining whether theregion number obtained at the obtaining step has changed or not; and arecording step of recording an imaged picture in a recording medium, inresponse to that a recording instruction is detected at the recordinginstruction detecting step and when it is determined at the determiningstep that the region number has changed.

To achieve the above object, a storage medium according to the presentinvention stores a program that is readable by a computer possessed byan imaging apparatus and controls the computer to function as: arecording instruction detecting unit that detects an instruction torecord a picture that is imaged by an imaging unit; a characteristicpicture region detecting unit that detects a characteristic pictureregion included in a picture imaged by the imaging unit, thecharacteristic picture region containing a predetermined characteristic;an obtaining unit that makes the imaging unit image picturescontinuously, and obtains a region number each time a picture is imaged,the region number indicating a number of characteristic picture regionsdetected by the characteristic picture region detecting unit; adetermining unit that determines whether the region number obtained bythe obtaining unit has changed or not; and a recording unit that recordsan imaged picture in a recording medium, in response to that therecording instruction detecting unit detects a recording instruction andwhen the determining unit determines that the region number has changed.

BRIEF DESCRIPTION OF THE DRAWINGS

These objects and other objects and advantages of the present inventionwill become more apparent upon reading of the following detaileddescription and the accompanying drawings in which:

FIG. 1 is a block diagram of a camera according to an embodiment of thepresent invention;

FIG. 2 is a diagram showing one example of a picture that is displayedon a display of a display unit;

FIG. 3 is a diagram showing one example of a picture that includes onemore human face than included in the picture of FIG. 2;

FIG. 4 is a diagram showing one example of a main flowchart according toa first embodiment of the present invention;

FIG. 5 is a diagram showing one example of a sub flowchart according tothe first embodiment of the present invention;

FIG. 6 is a diagram showing a main flowchart according to a modifiedexample of the first embodiment of the present invention;

FIG. 7 is a diagram showing one example of a main flowchart according toa second embodiment of the present invention;

FIG. 8 is a diagram showing one example of a main flowchart according toa modified example of the second embodiment of the present invention;and

FIG. 9 is a diagram showing one example of a main flowchart according toa third embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

As shown in FIG. 1, a camera 10 according to an embodiment of thepresent invention includes an imaging unit 1, a CPU (Central ProcessingUnit) 2, a memory unit 3, a recording medium control unit 4, a recordingmedium 5, an operation unit 6, a display unit 7, and a timer 8.

The imaging unit 1 includes an imaging device such as a CCD (ChargeCoupled Device), a CMOS (Complementary Metal Oxide Semiconductor) imagesensor, etc. The imaging unit 1 images pictures continuously. Theimaging unit 1 converts an imaged picture from Analog to Digital (A/D),and outputs picture data, which is in the form of a digital signal, tothe CPU 2.

The CPU 2 is a programmable processor. The CPU 2 controls the entirecamera 10. The CPU 2 receives picture data output by the imaging unit 1,converts it into a format displayable by the display unit 7, and outputsit to the display unit 7 in the form of a through-the-lens image. Whenrecording picture data, the CPU 2 applies various kinds of imageprocesses and coding to the picture data, and outputs it to therecording medium control unit 4. The CPU 2 instructs the recordingmedium control unit 4 to record the picture data in the recording medium5.

The memory unit 3 includes memories such as a RAM (Random AccessMemory), a ROM (Read Only Memory), a flash memory, etc. The memory unit3 stores programs of the CPU 2, various settings, etc. The memory unit 3also temporarily stores data of an imaged picture.

The recording medium control unit 4 records picture data in therecording medium 5 in accordance with an instruction of the CPU 2. Therecording medium 5 holds the data of the imaged picture recorded therein

The recording medium 5 may be, for example, an SD (Secure Digital)memory card, a hard disk, a CD (Compact Disk), or a DVD (DigitalVersatile Disk).

The operation unit 6 includes various operation keys and switches suchas a shutter button and an up, down, left, and right cursor key.

The CPU 2 performs auto-focusing and automatic exposure upon detectingan operation to half-press the shutter button, for example.

Upon detecting an operation to full-press the shutter button, the CPU 2immediately instructs the recording medium control unit 4 to recordpicture data in the recording medium 5. Further, upon detecting theoperation to full-press the shutter button, the CPU 2 detects humanfaces (specifically, picture regions representing faces) from eachimaged picture and obtains the number of the detected faces, as will bedescribed later. When the number of faces increases, the CPU 2 instructsthe recording medium control unit 4 after a predetermined period of timepasses since the increase to record picture data in the recording medium5.

The display unit 7 includes a display. The CPU 2 displays variousmessages and a through-the-lens image, which has been reduced in size ascompared with the pictures imaged by the imaging unit 1, on the display.The size of the through-the-lens image is, for example, 320×240 pixels(QVGA). The user gives an operation to press the shutter button, etc.,while checking the through-the-lens image on the display.

The timer 8 is a down-counter, for example. The timer 8 clocks time bycounting down a preset predetermined period of time to pass, and uponcounting down to 0, notifies the CPU 2 that the count has become 0 bygiving the CPU 2 an interrupt.

Next, an overview of a process according to the first embodiment will begiven. First, when there occurs, after an operation to full-press theshutter button is detected, an increase in the number of human facesincluded in continuously imaged pictures, the CPU 2 records picture datathat is based on a picture imaged after a predetermined period of timepasses since the increase, in the recording medium 5.

Upon detecting that the shutter button is half-pressed, the CPU 2detects human faces included in imaged pictures and obtains the numberof the detected faces. The CPU 2 displays face frames 71 (71A to 71C) asshown in FIG. 2, by superimposing them on the through-the-lens imagedisplayed on the display of the display unit 7.

Then, when the shutter button is full-pressed, the CPU 2 again detectshuman faces from each continuously imaged picture and obtains the numberof the detected faces. If the number of faces has increased, forexample, from three to four and hence three face frames 71A to 71C haveincreased to four face frames 71A to 71D as shown in FIG. 3, the timer 8starts counting down in order to clock a predetermined period of time.The CPU 2 records data of a picture that is imaged when the count of thetimer 8 turns to 0 in the recording medium 5.

A specific process will be described in detail with reference to a mainflowchart shown in FIG. 4. First, the CPU 2 makes initial settings suchas setting a predetermined period of time in the timer 8 (step S101),and waits until an operation to half-press the shutter button isdetected (step S102; No).

Upon detecting an operation to half-press the shutter button (step S102;Yes), the CPU 2 performs a face detecting process, which will bedescribed later, and counts the number of the detected faces (stepS103). Then, the CPU 2 performs auto-focusing and automatic exposure,targeting the detected faces (step S104).

At this time, as shown in FIG. 2, the CPU 2 displays face frames 71 (71Ato 71C) on the through-the-lens image displayed on the display of thedisplay unit 7, superimposing them on the detected faces. Under thisstate, the CPU 2 waits until an operation to full-press the shutterbutton is detected (step S105; No).

Upon detecting an operation to full-press the shutter button (step S105;Yes), the CPU 2 again performs the face detecting process and counts thenumber of the detected faces (step S106). Then, the CPU 2 stores thenumber of the faces counted in the face detecting process in apredetermined area of the memory unit 3 (step S107). Note that the CPU 2may skip step S106 and store the number of the faces counted at stepS103 in a predetermined area of the memory unit 3 at step S107.

After this, the CPU 2 performs the face detecting process on each newpicture that is input from continuous imaging, and counts the number ofthe detected faces (step S108).

In a case where the number of the faces counted at step S108 is equal toor smaller than the number of the faces stored at step S107 (step S109;No), the CPU 2 returns to step S107 to store the number of the facescounted at step S108, and again performs step S108 to perform the facedetecting process and count the number of the detected faces.

The CPU 2 compares the number of the faces counted at step S108 and thenumber of the faces stored at step S107, and if it is determined thatthe former has increased from the latter (step S109; Yes), the CPU 2controls the timer 8 to start counting down the predetermined period oftime. That is, among continuously imaged pictures, the CPU 2 compares anearest previously imaged picture and a currently imaged picture as tothe number of faces included therein. And in response to an increase inthe number of the faces, the CPU 2 controls the timer 8 to startcounting down.

Upon the count turning to 0, the timer 8 gives an interrupt to the CPU 2to notify that the predetermined period of time has passed (step S110;Yes).

When the predetermined period of time has passed (step S110; Yes), theCPU 2 instructs the recording medium control unit 4 to record thepicture that is imaged at this timing of passage in the recording medium5 (step S111). The recording medium control unit 4 records the imagedpicture in the recording medium 5.

Specifically speaking, the face detecting process at steps S103, S106,and S108 detects faces by using a face detector that has a function ofdistinguishing between picture regions representing faces and pictureregions not representing faces.

The face detector can detect faces with accuracy sufficient for thepurpose of the face detection of the present embodiment, even if theresolution is 320×240 pixels (QVGA) or so. Hence, in the presentembodiment, the CPU 2 performs the face detecting process on thethrough-the-lens image.

FIG. 5 is a diagram showing one example of a sub flowchart of the facedetecting process described above. As shown in FIG. 5, the CPU 2 cutsout a small region from the through-the-lens image (step S201), anddetermines by the face detector whether the small region includes a faceor not (step S202). In order to detect a face that is captured in alarge size or a face that is captured in a small size, the CPU 2contracts or expand a small region to cut out a various-sized smallregion from the through-the-lens image and inputs the cut-out region tothe face detector.

The face detector calculates a score that indicates face-likeness, basedon a characteristic quantity that is obtained from the small region cutout from the through-the-lens image and a characteristic quantity thatis retrieved from a face identification database stored in the ROM orthe like. In a case where the score is larger than a preset threshold,the face detector determines that the small region cut out from thethrough-the-lens image includes a face.

Note that according to the present invention, the face detector isembodied as software that is executed by the CPU 2.

In a case where it is determined by the face detector that the smallregion does not include a face (step S202; No), the CPU 2 returns tostep S201 and cuts out a next small region. On the other hand, in a casewhere it is determined by the face detector that the small regionincludes a face (step S202; Yes), the CPU 2 counts the number ofdetected faces (step S203).

In a case where it is determined that the number of the counted faces islarger than the maximum number of faces that are allowed to be detectedfrom one picture (step S204; Yes), the CPU 2 displays a message thatsays, for example, that “there are too many persons”, on the display ofthe display unit 7 (step S205), and terminates this process by jumpingto after step S111 of FIG. 4.

On the other hand, in a case where it is determined that the number ofthe counted faces is not larger than the maximum number of faces thatare allowed to be detected from one picture (step S204; No), the CPU 2determines whether the current small region is the last one in thepicture (step S206). In a case where it is determined that the smallregion is not the last one in the picture (step S206; No), the CPU 2returns to step S201 and cuts out a next small region. When thedetermination by the face detector on the last small region in thepicture is completed (step S206; Yes), the CPU 2 returns to the mainflowchart.

The first embodiment may be modified as follows. FIG. 6 is a diagramshowing a modified example of the main flowchart shown in FIG. 4. StepsS101 to S106 and steps S110 and S111 are the same as those in FIG. 4.

Upon detecting an operation to full-press the shutter button (step S105;Yes), the CPU 2 performs the face detecting process and counts thenumber of the detected faces (step S106). The CPU 2 stores the number ofthe faces counted in the face detecting process in a predetermined areaof the memory unit 3 (step S307). After this, the CPU 2 repeats the facedetecting process for each picture and obtains the number of facescounted (step S308). In a case where the number of the faces counted atstep S308 is equal to or smaller than the number of the faces stored atstep S307 (step S309; No), the CPU 2 returns to step S308 to againperform the face detecting process and counts the number of facesdetected.

In a case where it is determined that the number of the faces counted atstep S308 is larger than the number of the faces stored at step S307(step S309; Yes), the CPU 2 waits for a predetermined period of time topass (step S110) and records data of the picture that is imaged at thistiming of passage in the recording medium 5 (step S111).

That is, in FIG. 4, the CPU 2 compares a nearest previously imagedpicture and a currently imaged picture among continuously imagedpictures as to the number of faces included and records picture data inthe recording medium 5 in response to an increase in the number offaces. As compared with this, in the modified example shown in FIG. 6,the CPU 2 compares a picture imaged when an operation to full-press theshutter button is detected and any picture imaged after the operation tofull-press the shutter button is detected among continuously imagedpictures as to the number of faces included, and records picture data inthe recording medium 5 in response to an increase in the number offaces.

Second Embodiment

In many cases, a group of persons, who are to have a group photo taken,turn their full face toward the camera or the like. In the secondembodiment, when a group of persons take a group photo of theirs bysetting a self-timer, a full face detector, which distinguishes betweenfull faces that face the imager direction and faces that face otherdirections, detects full faces.

The second embodiment employs the camera 10 likewise the firstembodiment.

FIG. 7 is a diagram showing one example of a main flowchart according tothe second embodiment of the present invention. FIG. 7 is different fromFIG. 4 only in its face detecting process (steps S403, S406, and S408).The steps other than steps S403, S406, and S408 are the same as those ofFIG. 4.

In response to an operation to half-press the shutter button beingdetected (step S102; Yes), the CPU 2 performs a face detecting process(step S403), and then performs auto-focusing and automatic exposure(step S104). At this time, the CPU 2 sets imaging conditions such asfocus, camera exposure, exposure, etc. by targeting the faces detectedin the face detecting process.

At this time, the imaged persons may not necessarily be facing thecamera direction, but may be facing sideward or an oblique direction ortilting their faces. Hence, at step S403, the CPU 2 performs a facedetecting process in many directions by using a first face detector,which is to be described later. The first face detector can detect notonly a full face, but a half face, an oblique face, a tilted face, etc.

Meanwhile, when having a group photo taken, the group of persons arehighly probably turning their full face toward the camera. Hence, upondetecting an operation to full-press the shutter button (step S105;Yes), the CPU 2 uses not the first face detector mentioned above but asecond face detector that identifies a full face to perform a facedetecting process in the camera direction and counts the number of thedetected faces (step S406). The second face detector will be describedlater.

The CPU 2 stores the number of the faces counted in the face detectingprocess performed in the camera direction in a predetermined area of thememory unit 3 (step S107).

Then, each time a new picture is input from continuous imaging, the CPU2 performs the face detecting process on the picture in the cameradirection and counts the number of the detected faces (step S408).

After this, in a case where it is determined that the number of thefaces counted at step S408 is equal to or smaller than the number of thefaces stored at step S107 (step S109; No), the CPU 2 stores the numberof the counted faces in the predetermined area of the memory unit 3(step S107), and again performs step S408 to perform the face detectingprocess in the camera direction and count the number of the detectedfaces.

On the other hand, in a case where it is determined that the number ofthe faces counted at step S408 has increased from the number of thefaces stored at step S107 (step S109; Yes), the CPU 2 waits for apredetermined period of time to pass (step S110) and records data of thepicture that is imaged at this timing of passage in the recording medium5 (step S111). That is, the CPU 2 compares a nearest previously imagedpicture and a currently imaged picture among continuously imagedpictures as to the number of full faces included therein, and inresponse to an increase in the number of full faces, records picturedata in the recording medium 5.

Next, the first face detector and the second face detector will beexplained.

The face detector used at the above step S202 of FIG. 5 calculates ascore that indicates face-likeness, based on a characteristic quantityobtained from a small region cut out from the through-the-lens image anda characteristic quantity retrieved from a face identification databasestored in the ROM or the like. The face detector determines that thesmall region cut out from the through-the-lens image is a face, in acase where the score is larger than a preset threshold.

Setting this threshold high means making the face detecting conditionstricter. Accordingly, setting the threshold high makes it more certainthat a face-like object will be selected, and can increase theprobability that a full face will be detected. Hence, with the thresholdset high, the face detector used at step S202 of FIG. 5 can be thesecond face detector. In contrast, with the threshold set low, the facedetector used at step S202 of FIG. 5 can be the first face detector.

Alternatively, the first face detector and the second face detector maybe created separately with the use of the following technique.

Specifically, this technique is one of human face detecting methods thatuses statistical pattern recognition. This method makes a face detectorlearn a face recognition rule by using many facial pictures and manynon-facial pictures. For example, according to Adaboost learning, a facedetector with a high recognition ability can be configured bycombination of detectors with a relatively low recognition ability.

Hence, it is possible to create the second face detector suitable forfull face detection, by making it learn a recognition rule by using manyfull-face pictures and various directional-face pictures (picturesrepresenting a side face that faces sideward, pictures representing anoblique face that faces an oblique direction, pictures representing atilted face, etc.). Further, it is possible to create the first facedetector suitable for various directional face detection, by making itlearn a recognition rule by using various directional-face pictures andmany non-facial pictures.

Further, by using the first face detector as the face detector used atstep S202 of FIG. 5, it is possible to perform the various directionalface detecting process of step S403 in the sub flowchart of FIG. 5.Meanwhile, by using the second face detector as the face detector usedat step S202 of FIG. 5, it is possible to perform the face detectingprocess in the camera direction of steps S406 and S408 in the subflowchart of FIG. 5.

The second embodiment may be modified as follows. FIG. 8 is a diagramshowing a modified example of the second embodiment described above.FIG. 8 is different from FIG. 6 in its face detecting process (stepsS403, S506, and S508). The steps other than steps S403, S506, and S508are the same as those of FIG. 6.

Likewise in FIG. 7, in response to an operation to half-press theshutter button being detected (step S102; Yes), the CPU 2 performs thevarious directional face detecting process (step S403), and performsauto-focusing and automatic exposure targeting the detected faces (stepS104).

However, even after an operation to full-press the shutter button isdetected, the imaged persons might be facing sideward, upward, ordownward. Hence, upon detecting an operation to full-press the shutterbutton (step S105; Yes), the CPU 2 performs the various directional facedetecting process unlike in FIG. 7, and counts the number of thedetected faces (step S506). The CPU 2 stores the number of the facescounted in the various directional face detecting process in apredetermined area of the memory unit 3 (step S307). Note that the CPU 2may skip step S506 and store the number of the faces counted at stepS403 in the predetermined area of the memory unit 3 at step S307.

The CPU 2 performs the face detecting process in the camera direction oneach continuously imaged picture and counts the number of the detectedlull faces (step S508). In a case where it is determined that the numberof the full faces obtained at step S508 is equal to or smaller than thenumber of the faces stored at step S307 (step S309; No), the CPU 2returns to step S508 to again perform the face detecting process in thecamera direction and count the number of the detected full faces.

In a case where it is determined that the number of the full facescounted at step S508 is larger than the number of the faces stored atstep S307 (step S309; Yes), the CPU 2 waits for a predetermined periodof time to pass (step S110) and records data of the picture that isimaged at this timing of passage in the recording medium 5 (step S111).

That is, in the modified example shown in FIG. 8, the CPU 2 detectsvarious directional faces when an operation to full-press the shutterbutton is detected, and counts the number of the detected faces andstores it in the predetermined area of the memory unit 3. Then, inresponse to that the number of full faces included in a currently imagedpicture is larger than the number of the faces stored, the CPU 2 recordsdata of an imaged picture in the recording medium 5.

The first face detector detects not only full faces but half faces,oblique faces, etc., while the second face detector detects only fullfaces. Therefore, firstly detecting the number of faces using the firstface detector and then switching to the second face detector to detectthe number of full faces may result in a reduction of the number ofdetected faces.

The CPU 2 compares the number of faces included in a picture that isimaged when an operation to full-press the shutter button is detectedwith the number of full faces that is obtained from each picture that isimaged continuously thereafter. Therefore, it is possible to preventpicture data from being recorded (step S111) in response to that, forexample, a person who faced sideward in a picture that was imaged whenan operation to full-press the shutter button was detected (step S105)has turned to face the camera direction.

When setting imaging conditions such as focus, camera exposure,exposure, etc., it is necessary that faces can be detected regardless ofthe directions of the faces and the expressions on the faces. Meanwhile,after imaging conditions are set, it is desired that persons who facethe camera direction be imaged, if a group photo of the persons is to beimaged.

The second embodiment can satisfy these conflicting needs by detectingfaces regardless of whether the faces face the camera direction or notwhen setting imaging conditions while determining whether the faces facethe camera direction or not when imaging the faces.

Third Embodiment

The third embodiment employs face recognition for recognizing aparticular person's face, instead of face detection. The CPU 2 recordsan imaged picture when there is an increase in the number of faces ofparticular persons that are included in imaged pictures.

The third embodiment employs the camera 10 likewise the firstembodiment.

The CPU 2 preliminarily images faces of persons, who are the target ofrecognition, and extracts the characteristics of the faces. The CPU 2registers the extracted characteristics of the faces of therecognition-target persons in a predetermined registration area of thememory unit 3. Note that characteristics of faces of a plurality ofpersons can be registered in the registration area.

FIG. 9 is a diagram showing one example of a main flowchart according tothe third embodiment of the present invention.

As shown in the main flowchart of FIG. 9, in response to an operation tohalf-press the shutter button being detected (step S102; Yes), the CPU 2recognizes the face of any recognition-target person included incontinuously imaged pictures, and counts the number of the recognizedfaces (step S603). Then, the CPU 2 performs auto-focusing and automaticexposure targeting the recognized faces (step S104).

Next, in response to an operation to full-press the shutter button beingdetected (step S105; Yes), the CPU 2 recognizes the face of anyrecognition-target person included in continuously imaged pictures andcounts the number of the recognized faces (step S606), and stores thenumber of the counted faces in a predetermined area of the memory unit 3(step S607). Note that the CPU 2 may skip step S606 and store the numberof the faces counted at step S603 in the predetermined area of thememory unit 3.

Then, the CPU 2 recognizes the face of any recognition-target personfrom each picture still further continuously imaged, and counts thenumber of the recognized faces (step S608). In a case where the numberof the counted faces is equal to or smaller than the number of the facesstored at step S607 (step S609; No), the CPU 2 returns to step S607 tostore the number of the counted faces in the predetermined area of thememory 3 and again recognize the face of any recognition-target personfrom continuously imaged pictures and count the number of the recognizedfaces (step S608).

The CPU 2 compares the number of the faces stored at step S607 and thenumber of faces currently counted, and in response to that the latterhas increased from the former (step S609; Yes), controls the timer 8 tostart counting down a predetermined period of time (step S110).

It is possible to realize the face recognition of steps S603, S606, andS608 in the flow of FIG. 5, by replacing step S202 with a process fordetermining whether or not a small region includes the face of anyrecognition-target person that is registered in the memory unit 3.

The process of FIG. 9 is the same as the process of FIG. 4 except inrecognizing the face of any recognition-target person and counting thenumber of the recognized faces (steps S603, S606, and S608).

Needless to say, the process of FIG. 9 may be made the same as themodified process of FIG. 6 except in recognizing the face of anyrecognition-target person and obtaining the number of the recognizedfaces.

In the third embodiment, CPU 2 records a picture that is imaged when thepersons whose facial characteristic is registered come into the imagingrange. Hence, it is possible to prevent a picture from being recorded inresponse to any unspecified person whose facial characteristic is notregistered coming into the imaging range, which may be the case whenpictures are taken in a crowd such as a tourist spot, an amusement park,etc.

The first embodiment described above detects human face pictures fromeach imaged picture and records a picture in response to that the numberof human face pictures has increased, while it is possible that apicture be recorded in response to that faces have disappeared.

In this case, the CPU 2 records a picture that includes no human face inthe recording medium 5. Hence, it is possible to prevent any indifferentperson from being imaged when taking photos of scenery or constructions.

As explained above, the present invention requires no setting of anumber of persons intended to be imaged, and can record a picture thatis imaged in response to that the number of imaged persons included inthe imaging range has changed.

That is, when taking a group photo that should include the cameraoperator, the present invention requires no preliminary setting of thenumber of persons intended to be imaged, but records a picture inresponse to that the camera operator has come into the imaging range.Hence, the present invention can image a group photo that includes thecamera operator, by not requiring him/her to be nervous about timing butallowing him/her leeway.

The second embodiment detects full faces by using the second facedetector that is suitable for detecting full faces. Hence, a groupphoto, in which all the imaged persons face the camera direction, can beimaged more securely than in a case where the second face detector thatalso detects half faces, oblique faces, etc. is used.

Though embodiments of the present invention have been described, itshould be understood that various corrections or combinations thereofthat may become necessary from any design requirement or any otherfactor are included in the scope of the invention set forth in theclaims and of the invention that corresponds to the specific examplesdescribed in the embodiments.

A program for realizing the functions of the present invention may bestored in a storage medium to be distributed, or may be supplied via anetwork.

Various embodiments and changes may be made thereunto without departingfrom the broad spirit and scope of the invention. The above-describedembodiments are intended to illustrate the present invention, not tolimit the scope of the present invention. The scope of the presentinvention is shown by the attached claims rather than the embodiments.Various modifications made within the meaning of an equivalent of theclaims of the invention and within the claims are to be regarded to bein the scope of the present invention.

This application is based on Japanese Patent Application No. 2008-167053filed on Jun. 26, 2008 and including specification, claims, drawings andsummary. The disclosure of the above Japanese Patent Application isincorporated herein by reference in its entirety.

1. An imaging apparatus comprising: an imaging unit configured to capture images continuously; a face detection unit configured to detect a face in each of the images captured by the imaging unit; a first face detection control unit configured to set a first detecting condition for the face detection unit to thereby control the face detection unit to detect faces facing in various directions in the images continuously captured by the imaging unit; an imaging condition setting unit configured to, when a face is detected by control executed by the first face detection control unit, set an imaging condition suitable for the detected face; a recording instruction detecting unit configured to detect a recording instruction after the imaging condition setting unit sets the imaging condition; a second face detection control unit configured to, after the recording instruction is detected by the recording instruction detecting unit, set for the face detection unit a second detecting condition, which is more limiting than the first detecting condition, to thereby control the face detection unit to detect a forward-facing face, which does not include any faces facing in other directions, in the images continuously captured by the imaging unit; a face number obtaining unit configured to count a number of forward-facing faces that were detected by control executed by the second face detection control unit, for each of the continuously captured images; a change determination unit configured to determine whether or not the number of the forward-facing faces that were counted by the face number obtaining unit in one of the continuously captured images is different as compared to an image captured just prior to the one of the continuously captured images; and a recording unit that, in response to detection of the recording instruction, and in response to the determination of the change determination unit, saves in a recording medium an image representing the forward-facing faces, captured after the change determination unit determines that the number of forward-facing faces is different.
 2. The imaging device according to claim 1, wherein the change determination unit determines whether the number of forward-facing faces counted by the face number obtaining unit in the one of the continuously captured image has increased as compared to the image captured just prior to the one of the continuously captured images; and wherein the recording unit, in response to the detection of the recording instruction, and in response to a determination that the number of forward-facing faces has increased, saves in the recording medium the image representing the forward-facing faces.
 3. The imaging apparatus according to claim 1, further comprising: a face number storing unit configured to, in response to the detection of the recording instruction by the recording instruction detecting unit, store the number of forward-facing faces counted by the face number obtaining unit; wherein the change determination unit is configured to determine whether the number of forward-facing faces in the one of the continuously captured image is larger than the number of forward-facing faces stored in the face number storing unit; and wherein the recording unit is configured to, in response to the determination by the change determination unit that the number of forward-facing faces has increased, save in the recording medium the image representing the forward-facing faces.
 4. The imaging apparatus according to any one of claim 1, further comprising: a clock unit that measures a predetermined time set in advance; wherein the recording unit is configured to save the image representing the forward-facing faces in response to elapsing of the predetermined time measured by the clock unit after the determination of the change by the change determination unit.
 5. An imaged picture recording method, comprising: an imaging step of causing an imaging unit to continuously capture images; a first face detection control step of setting a first detecting condition for a face detection unit to thereby control the face detection unit to detect faces facing in various directions in the images continuously captured in the imaging step; an imaging condition setting step of, when a face is detected by control executed in the first face detection control step, setting an imaging condition suitable for the detected face; a recording instruction detecting step of detecting a recording instruction after the imaging condition setting step sets the imaging condition; a second face detection control step of, after the recording instruction is detected in the recording instruction detecting step, setting for the face detection unit a second detecting condition, which is more limiting than the first detecting condition, to thereby control the face detection unit to detect a forward-facing face, which does not include any faces facing in other directions, in the images continuously captured in the imaging step; a face number obtaining step of obtaining a number of forward-facing faces that were detected by the control executed in the second face detection control step, for each of the continuously captured images; a change determination step of determining whether or not the number of forward-facing faces counted in the face number obtaining step in one of the continuously captured images is different as compared to an image captured just prior to the one of the continuously captured images; and a recording step of, in response to detection of the recording instruction, and in response to the determination in the change determination step, saving in a recording medium an image representing the forward-facing faces captured after it is determined in the change determination step, that the number of forward-facing faces is different.
 6. A non-transitory computer-readable storage medium storing a program that is readable by a computer of an imaging apparatus to control the computer to function as elements including: an imaging unit configured to capture images continuously; a face detection unit configured to detect a face in each of the images captured by the imaging unit; a first face detection control unit configured to set a first detecting condition for the face detection unit to thereby control the face detection unit to detect faces facing in various directions in the images continuously captured by the imaging unit; an imaging condition setting unit configured to, when a face is detected by control executed by the first face detection control unit, set an imaging condition suitable for the detected face; a recording instruction detecting unit configured to detect a recording instruction after the imaging condition setting unit sets the imaging condition; a second face detection control unit configured to, after the recording instruction is detected by the recording instruction detecting unit, set for the face detection unit a second detecting condition, which is more limiting than the first detecting condition, to thereby control the face detection unit to detect a forward-facing face, which does not include any faces facing in other directions, in the images continuously captured by the imaging unit; a face number obtaining unit configured to count a number of forward-facing faces that were detected by control executed by the second face detection control unit, for each of the continuously captured images; a change determination unit configured to determine whether or not the number of the forward-facing faces that were counted by the face number obtaining unit in one of the continuously captured images is different as compared to an image captured just prior to the one of the continuously captured images; and a recording unit that, in response to detection of the recording instruction, and in response to the determination of the change determination unit, saves in a recording medium an image representing the forward-facing faces, captured after the change determination unit determines that the number of forward-facing faces is different. 